<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="easyui-1.3.5/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="easyui-1.3.5/themes/icon.css" />
<script src="easyui-1.3.5/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="easyui-1.3.5/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<ul id="tt"></ul>

<body>
</body>
<script type="text/javascript">
$("#tt").tree({
	url: "data/tree.json",
	//将所有的一级菜单的状态设置为close
	loadFilter: function(data) {
		for(var i = 0; i < data.length; i++) {
			if(data[i].state != 'close') {
				data[i].state = 'closed'
			}
		}
		return data;
	}
});
</script>

</html>